import urllib
import urllib2

def sendData():
	print("start send data to server")
	try:
		test_data = {"parkingName":"test"}
		test_data_urlencode = urllib.urlencode(test_data)
		req = urllib2.Request(url = "http://127.0.0.1/parkingData/getErrorMsg.php",data =test_data_urlencode)
		f = urllib2.urlopen(req)
		print(f.read())
		f.close()
	except BaseException:
		print("network not avisable")

sendData()